<div class="content_filtro">
    <div class="filtro">
        <form id="form_filtro" method="get" action="">
            <i>Filtrar</i>
            
            <input type="text" name="filtro_nm" placeholder="Tipo" value="<?php echo $this->filtro_nm?>" />
            
            <input type="submit" class="btn-pdr" name="buscar" value="buscar" />
            
        </form>
    </div>
    <?php if($this->per_add){?>
    <div class="content-btn">
        <span>Nova</span><a href="<?php echo $this->url(array('controller' => $this->controller, 'action' => 'edit','id'=>'')); ?>">+</a>
    </div>
    <?php } ?>
</div>

<div class="content-list">
    
    <h2><?php echo $this->titulo;?></h2>
    <br>
    
    <table id="tlist">
        <thead>
            <tr>
                <th>Tipo</th>
                <th>Tipo</th>
                <th class="bc">&nbsp;</th>
            </tr>
        </thead>
        <tbody>
            <?php foreach ($this->result as $row) { ?>
                <tr>
                    <td><?php echo $row['TAH_NOM']; ?></td>
                    <td><?php echo tools::returnStatus($row['TAH_STA']); ?></td>
                    <td class="bc">
                        <?php if($this->per_edt){?><a class="btn-pdr" href="<?php echo $this->url(array('controller' => $this->controller, 'action' => 'edit', 'id' => $row['TAH_ID'])); ?>">Editar</a><?php }?>
                        <?php if($this->per_del && $row['TAH_STA'] == 0){?><a class="btn-pdr" href="javascript:void(0);" onclick="list_delete('<?php echo $this->controller; ?>', <?php echo $row['TAH_ID'] ?>, $(this));">Deletar</a><?php }?>
                    </td>
                </tr>
            <?php } ?>
        </tbody>
    </table>
    
    <?php echo $this->paginationControl($this->paginator, 'Sliding', 'pagination.phtml'); ?>
</div>
<script>dataPicker($('#dtfiltro'));</script>